home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
swtools
/
trubasic
/
rolldemos
/
demos
/
rgb
/
aboutrgb.tru
next >
Wrap
Text File
|
1994-08-02
|
2KB
|
77 lines
! description of True BASIC demos
call tw_wset_size(0,684,684)
call tw_wset_title(0,"About RGB Mode")
set text justify "center","base"
call info
do
if refresh(0)=1 then call info
get mouse x,y,state
if state<>0 then stop
loop
sub info
clear
print
print
let a$="RGB Mode & Advanced GL Functions"
set color "magenta"
set text justify "center","bottom"
let r=setfont("Courier")
let r=setfontstyle("Bold")
let r=setfontsize(18)
plot text, at .5,.93: a$
set color "blue"
let t=strwidth(a$)
box area .5-t/2,.5+t/2,.91,.92
box area 0,.01,0,1
box area 0,1,.99,1
box area .99,1,0,1
box area 0,1,0,.01
set color "white"
print
print
print
print " These demos use some of the advanced Graphics Library features"
print " such as doublebuffering and Gourard shading. Most operate in RGB"
print " mode as opposed to colormap mode."
print
print " Doublebuffer mode lets you draw into the back buffer and then"
print " swap the completed image into view, smoothing the animation process."
print " The use of the BASIC PICTURE statement and the BOX KEEP/SHOW commands"
print " provides an easy interface to graphical objects and rendering."
print
print " The PICTURE command lets you define an object and then SCALE,"
print " ROTATE or SHIFT the image with different messages for the DRAW"
print " command. You may also define your own transformation matrices."
print
print " RGB mode specifies pixel values in RGB intensities as opposed"
print " to COLORMAP mode which associates entries in a colormap with RGB "
print " triplets. True BASIC lets you seamlessly shift between these two"
print " modes so that you can incorporate more advanced C-level functions"
print " into your BASIC programs."
print
print " In True BASIC you can specify colors with the statements:"
print
print
set color "yellow"
print " SET COLOR clr$ SET BACK clr$ SET COLOR MIX r,g,b"
set color "white"
print
print
print " where clr$ is a string such as ""blue"" and r,g, and b are color"
print " intensities in the range 0 to 1. You may also specify colors by"
print " number."
print
print " For the X Windows version, there are ""shared"" and ""dynamic"" modes"
print " so that you can share resources or allocate your own read-write"
print " cells."
print
print " <click the left mouse button to continue>"
end sub
end